package org.spring.stream;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;

@EnableBinding(Sink.class)
public class TimerSource {
	
	@Autowired private TestService service;

	@StreamListener(Sink.INPUT)
	public void processVote(Test vote) {
		service.savetest(vote);
	}
}
